﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;

namespace Dao.Interface
{
    public interface IPageRepository : IRepository<Page>
    {
        /// <summary>
        /// 获取页的分页集合
        /// </summary>
        /// <param name="areaID">分区ID</param>
        /// <param name="pageIndex">页索引</param>
        /// <param name="pageSize">页大小</param>
        /// <param name="pageCount">总页数</param>
        /// <param name="sortField">排序字段</param>
        /// <returns></returns>
        IQueryable<Page> LoadAllByPage(int areaID, int pageIndex, int pageSize, out int pageCount, string sortType);

        
        /// <summary>
        /// 获取共享页的分页集合
        /// </summary>
        /// <param name="pageIndex">页索引</param>
        /// <param name="pageSize">页大小</param>
        /// <param name="pageCount">总页数</param>
        /// <returns></returns>
        IQueryable<Page> LoadAllSharePageByPage(int pageIndex, int pageSize, out int pageCount);

        /// <summary>
        /// 获取页集合
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <param name="delete">是否删除</param>
        /// <returns></returns>
        IList<Page> LoadAllPage(object userID, bool delete);
    }
}
